/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-05-19
 * Time: 10:25
 */
public class Test {
    public static void eat(Animal an){
        an.eat();
    }
    public static void main(String[] args) {
    /*   Animal an1=new Cat("an1",1);
       an1.eat();
        Animal an2=new Dog("an2",2);
        an2.eat();*/
        Cat an1=new Cat("an1",1);
        Dog an2=new Dog("an2",2);
        eat(an1);
        eat(an2);
    }
}
